<script setup lang="ts">
withDefaults(
  defineProps<{
    lines?: number
  }>(),
  {
    lines: 1,
  },
)
</script>

<template>
  <div class="clamp-text" :style="{ '-webkit-line-clamp': lines }">
    <slot />
  </div>
</template>

<style scoped lang="scss">
.clamp-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
</style>
